package com.micro.ai.models.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 模型版本实体类
 * 
 * @author micro-ai
 * @since 0.0.1
 */
@Data
@TableName("model_versions")
@Schema(description = "模型版本信息")
public class ModelVersion implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "版本ID", example = "ver_123456789")
    private String id;

    /**
     * 模型ID
     */
    @Schema(description = "模型ID", example = "model_123", required = true)
    private String modelId;

    /**
     * 版本名称
     */
    @Schema(description = "版本名称", example = "v1.0.0", required = true)
    private String versionName;

    /**
     * 版本说明
     */
    @Schema(description = "版本说明", example = "修复了已知bug，提升了性能")
    private String versionNotes;

    /**
     * 是否为当前版本
     */
    @Schema(description = "是否为当前版本", example = "true")
    private Boolean isCurrent;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间", example = "2025-01-01 00:00:00")
    private LocalDateTime createdAt;
}
